import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";
// 路由信息
const routes = [
    {
        path: "/",
        name: "Frame",
        redirect: "/Home",
        component: () => import('../views/frame/Frame.vue'),
        children: [
            {
                path: "Home",
                name: "Home",
                component: () => import('../views/frame/child/home/Home.vue'),
            },
            {
                path: "devGuide",
                name: "devGuide",
                component: () => import('../views/frame/child/devGuide/DevGuide.vue'),
            },
            {
                path: "devDoc",
                name: "devDoc",
                component: () => import('../views/frame/child/example/Example.vue'),
            },
            {
                path: "Example",
                name: "Example",
                component: () => import('../views/frame/child/example/Example.vue'),
            },
            {
                path: "sceneExample",
                name: "sceneExample",
                component: () => import('../views/frame/child/sceneExample/sceneExample.vue'),
            }
        ]
    },
    {
        path: "/Editor",
        name: "Editor",
        component: () => import('../views/editor/Editor.vue'),
    }
];

// 导出路由
const router = createRouter({
    // history: createWebHistory(),
    history: createWebHashHistory(),
    routes
});

export default router;